﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Dbz.HomeworkHub.Core.Entities" assembly="Dbz.HomeworkHub.Core">

  <class name="Solution" table="Solution">

    <id name="SolutionId">
      <generator class="identity" />
    </id>

    <property name="Name" type="string" />
    <property name="SolutionText" type="string" />

    <property name="CreationDate" type="DateTime" />
    
    <many-to-one name="SolutionType" column="SolutionTypeId" class="Dbz.HomeworkHub.Core.Entities.SolutionType" cascade="none" />
    <many-to-one name="SolutionState" column="SolutionStateId" class="Dbz.HomeworkHub.Core.Entities.SolutionState" cascade="none" />
    <many-to-one name="Homework" column="HomeworkId" class="Dbz.HomeworkHub.Core.Entities.Homework" cascade="none" />
    <many-to-one name="Creator" column="CreatorId" class="Dbz.HomeworkHub.Core.Entities.User" cascade="none" />


  </class>
  
</hibernate-mapping>